<?php
	include_once "conf/conf.site.inc.php";
	include_once BDD_CLASS;
	include_once FUNCTIONS_FILE;
	
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="css/style.css" rel="stylesheet" type="text/css" media="screen" />
<center>
	<title>
		<?php echo NOM_SITE ?>
	</title>
</center>

<?php	
	if ((!isset($_SESSION["LOGIN"]) && $_SESSION["LOGIN"] == "")  && (!isset($_POST["login"]) && $_POST["login"] == "")) {
		redirect ("connexion.php");
		return false;
	}
	connexion ();
	if (!isset($db) && $db == NULL) {
		return 0;
	}
	
	if (isset($_POST["login"]) && $_POST["login"] != "") {
		$reqGetUser = "SELECT * FROM ".DATA_BASE.".".ARABE_USER." WHERE LOGIN = '".$_POST["login"]."' AND PASSWORD = '".$_POST["password"]."' LIMIT 1;";
		$result = $db->MysqlSelectPerso($reqGetUser);
		if (count($result) > 0) {
			$_SESSION["LOGIN"] = $result[0]["LOGIN"];
			$_SESSION["ID_USER"] = $result[0]["ID_USER"];
			$_SESSION["CONNEXION_TIME"] = time();
		}
		else {
			redirect ("connexion.php?badlogin=1");
			return false;
		}
	}
?>
<!--[if IE]>
<style type="text/css">
#sidebar #calendar {
	background-position: 0px 20px;
}
</style>
<![endif]-->
</head>
<body>
<div id="logo">
	<h1><a href="#"><?php echo NOM_SITE ?></a></h1>
</div>
<div id="menu">
	<ul>
		<li class="first"><a href="index_admin.php" accesskey="1" title="">Acceuil</a></li>
		<?php if (isset($_SESSION["LOGIN"]) && $_SESSION["LOGIN"] != "") {echo '<li><a href="eleve_inscription.php" accesskey="2" title="">Inscrir son Enfant</a></li>';}?>
		<?php if (isset($_SESSION["LOGIN"]) && $_SESSION["LOGIN"] != "") {echo '<li><a href="logout.php" accesskey="6" title="">Déconnexion</a></li>';}?>
	</ul>
</div>
<hr />
<div id="banner"><img src="images/img04.jpg" alt="" width="960" height="147" /></div>
<!-- start page -->
<div id="page">
	<!-- start content -->
	<div id="content">
		<div class="post">
			<h2 class="title"><a href="#">Welcome to FrozenAge</a></h2>
			<div class="entry">
				<h3>A free CSS template by NodeThirtyThree for Free CSS Templates</h3>
				<img src="images/img06.jpg" alt="" width="132" height="72" class="left" />
				<p>This is <strong>FrozenAge</strong>, a free, fully standards-compliant CSS template designed by <a href="http://www.nodethirtythree.com/">NodeThirtyThree</a> for <a href="http://www.freecsstemplates.org/" rel="nofollow">FCT</a>. The photos in this design are from <a href="http://www.pdphoto.org/">PDPhoto.org</a>.</p>
				<p>This free template is released under a <a href="#">Creative Commons Attributions 2.5</a> license, so you’re pretty much free to do whatever you want with it (even use it commercially) provided you keep the links in the footer intact. Aside from that, have fun with it :)  This design is also available as a <a href="http://www.freewpthemes.net/preview/frozenage/">WordPress theme</a> at <a href="http://www.freewpthemes.net/">Free Wordpress Themes</a>.</p>
			</div>
			<p class="meta">Posted on November 5, 2007 by <a href="#">Someone</a> &nbsp;|&nbsp; <a href="#">32 comments</a></p>
		</div>
	</div>
	<!-- end content -->
	<!-- start sidebar -->
	<div id="sidebar">
		<ul>
			<li id="calendar">
				<table summary="Calendar">
					<caption>
					November 2007
					</caption>
					<thead>
						<tr>
							<th abbr="Monday" scope="col" title="Monday">M</th>
							<th abbr="Tuesday" scope="col" title="Tuesday">T</th>
							<th abbr="Wednesday" scope="col" title="Wednesday">W</th>
							<th abbr="Thursday" scope="col" title="Thursday">T</th>
							<th abbr="Friday" scope="col" title="Friday">F</th>
							<th abbr="Saturday" scope="col" title="Saturday">S</th>
							<th abbr="Sunday" scope="col" title="Sunday">S</th>
						</tr>
					</thead>
					<tfoot>
						<tr>
							<td abbr="October" colspan="3" id="prev"><a href="http://wordpress.local/?m=200710" title="View posts for October 2007">&laquo; Oct</a></td>
							<td class="pad">&nbsp;</td>
							<td abbr="December" colspan="3" id="next"><a href="http://wordpress.local/?m=200710" title="View posts for December 2007">Dec &raquo;</a></td>
						</tr>
					</tfoot>
					<tbody>
						<tr>
							<td colspan="3" class="pad">&nbsp;</td>
							<td>1</td>
							<td>2</td>
							<td>3</td>
							<td>4</td>
						</tr>
						<tr>
							<td id="today">5</td>
							<td>6</td>
							<td>7</td>
							<td>8</td>
							<td>9</td>
							<td>10</td>
							<td>11</td>
						</tr>
						<tr>
							<td>12</td>
							<td>13</td>
							<td>14</td>
							<td>15</td>
							<td>16</td>
							<td>17</td>
							<td>18</td>
						</tr>
						<tr>
							<td>19</td>
							<td>20</td>
							<td>21</td>
							<td>22</td>
							<td>23</td>
							<td>24</td>
							<td>25</td>
						</tr>
						<tr>
							<td>26</td>
							<td>27</td>
							<td>28</td>
							<td>29</td>
							<td>30</td>
							<td class="pad" colspan="2">&nbsp;</td>
						</tr>
					</tbody>
				</table>
			</li>
		</ul>
	</div>
	<!-- end sidebar -->
</div>
<!-- end page -->
<div id="footer">
	<p class="legal"><?php echo FOOTER ?></p>
</div>
</body>
</html>
